<?php
include 'head.php';
if(isset($_GET['unset'])&&$_GET['unset'])
{
     setcookie("name", "", time()-72000);
     setcookie("id", "", time()-72000);
     header("Location: /");
}

//  所有活动
$activity_list = array() ;
$result = $mysqli->query("select * from activity");
while($row =$result->fetch_array() ){
    $activity_list[] = $row;
}

?>
<!-- content -->
<div class="content-top">
	<div class="container">
		<div class="amazing">
            <?php if(!empty($activity_list)&&isset($activity_list)):?>
                <?php foreach($activity_list as $val):?>
                        <div class="col-md-3 amaze">
                            <div class="portfolio-wrapper ">
                            <div class="ama-bottom">
                                <h3><a style="color:#777777" href="detail.php?id=<?php echo $val['id'];?>"  target="_blank"><?php echo $val['title']; ?></a></h3>
                            </div>
                            <div class="ama-top">
                                <a href="detail.php?id=<?php echo $val['id'];?>"  target="_blank" class="b-link-stripe b-animate-go  thickbox play-icon">
                               <img src="<?php echo $val['cover']; ?>"  width="255" height="235" alt="<?php echo $val['title']; ?>" />
                                    <ul class="social-ic">
                                        <li class="down"><span> ss</span></li>
                                    </ul>
                                </a>
                            </div>



                            </div>
                        </div>
                <?php endforeach;?>
            <?php endif;?>
		</div>
	</div>
</div>
<!-- content -->
<?php include 'foot.php';?>